FragmentController

Provides integration points with a FragmentManager for a fragment host.

It is the responsibility of the host to take care of the Fragment's lifecycle. The methods provided by FragmentController are for that purpose.

Functions

Link copied to clipboard
open fun attachHost(@Nullable parent: Fragment)
Attaches the host to the FragmentManager for this controller.
Link copied to clipboard
Link copied to clipboard
Moves all Fragments managed by the controller's FragmentManager into the activity created state.
Link copied to clipboard
Lets all Fragments managed by the controller's FragmentManager know a configuration change occurred.
Link copied to clipboard
Sends a context item selection event to the Fragments managed by the controller's FragmentManager.
Link copied to clipboard
open fun dispatchCreate()
Moves all Fragments managed by the controller's FragmentManager into the create state.
Link copied to clipboard
Lets all Fragments managed by the controller's FragmentManager know they should create an options menu.
Link copied to clipboard
open fun dispatchDestroy()
Moves Fragments managed by the controller's FragmentManager into the destroy state.
Link copied to clipboard
Moves all Fragments managed by the controller's FragmentManager into the destroy view state.
Link copied to clipboard
Lets all Fragments managed by the controller's FragmentManager know the device is in a low memory condition.
Link copied to clipboard
open fun dispatchMultiWindowModeChanged(isInMultiWindowMode: Boolean)
Lets all Fragments managed by the controller's FragmentManager know the multi-window mode of the activity changed.
Link copied to clipboard
Sends an option item selection event to the Fragments managed by the controller's FragmentManager.
Link copied to clipboard
Lets all Fragments managed by the controller's FragmentManager know their options menu has closed.
Link copied to clipboard
open fun dispatchPause()
Moves all Fragments managed by the controller's FragmentManager into the pause state.
Link copied to clipboard
open fun dispatchPictureInPictureModeChanged(isInPictureInPictureMode: Boolean)
Lets all Fragments managed by the controller's FragmentManager know the picture-in-picture mode of the activity changed.
Link copied to clipboard
Lets all Fragments managed by the controller's FragmentManager know they should prepare their options menu for display.
Link copied to clipboard
Link copied to clipboard
open fun dispatchResume()
Moves all Fragments managed by the controller's FragmentManager into the resume state.
Link copied to clipboard
open fun dispatchStart()
Moves all Fragments managed by the controller's FragmentManager into the start state.
Link copied to clipboard
open fun dispatchStop()
Moves all Fragments managed by the controller's FragmentManager into the stop state.
Link copied to clipboard
open fun doLoaderDestroy()
Destroys the loaders and, if their state is not being retained, removes them.
Link copied to clipboard
open fun doLoaderRetain()
Retains the state of each of the loaders.
Link copied to clipboard
open fun doLoaderStart()
Starts the loaders.
Link copied to clipboard
open fun doLoaderStop(retain: Boolean)
Stops the loaders, optionally retaining their state.
Link copied to clipboard
open fun dumpLoaders(@NonNull prefix: String, @Nullable fd: FileDescriptor, @NonNull writer: PrintWriter, @Nullable args: Array<String>)
Dumps the current state of the loaders.
Link copied to clipboard
Execute any pending actions for the Fragments managed by the controller's FragmentManager.
Link copied to clipboard
Returns a fragment with the given identifier.
Link copied to clipboard
Returns the list of active fragments.
Link copied to clipboard
Returns the number of active fragments.
Link copied to clipboard
Returns a FragmentManager for this controller.
Link copied to clipboard
Link copied to clipboard
Marks the fragment state as unsaved.
Link copied to clipboard
open fun onCreateView(@Nullable parent: View, @NonNull name: String, @NonNull context: Context, @NonNull attrs: AttributeSet): View
Instantiates a Fragment's view.
Link copied to clipboard
Lets the loaders know the host is ready to receive notifications.
Link copied to clipboard
open fun restoreAllState(@Nullable state: Parcelable, @Nullable nonConfigList: List<Fragment>)
Restores the saved state for all Fragments.
Link copied to clipboard
Restores the saved state for all LoaderManagers.
Link copied to clipboard
Restores the saved state for all Fragments.
Link copied to clipboard
Returns a list of LoaderManagers that have opted to retain their instance across configuration changes.
Link copied to clipboard
Returns a nested tree of Fragments that have opted to retain their instance across configuration changes.
Link copied to clipboard
Returns a list of Fragments that have opted to retain their instance across configuration changes.
Link copied to clipboard
Saves the state for all Fragments.